<?php


namespace app\controllers;


use app\models\request\ReqApplyUpdate;
use app\models\UserDto;
use app\service\ApplyService;

class ApplyUpdateController extends BaseJsonController
{
    /**
     * @param $req ReqApplyAct
     * @param $userInfo UserDto
     * @return \app\models\response\RespLogin|mixed
     * @throws \app\exception\OaException
     */
    public function doService($req,$userInfo)
    {
        $req->setUserId($userInfo->getUserId());
        $service  = new ApplyService();
        $service->update($req);
        return "申请成功";
    }
    protected function injectionReq()
    {
        return new ReqApplyUpdate();
    }
    public function needLogin(){
        return true;
    }
}